<extend name="Public:base" />
<block name="content">
    <form id="validation-form" method="post">
        <style type="text/css">
            li{
                list-style: none;;
            }
        </style>
        <div class="table-responsive">
            <table class="table table-striped table-bordered table-hover search-form" id="nav-table">
                <thead>
                <th>时间：<input id="startDate" name="start_time" value="{:I('start_time')}" class="Wdate" type="text" onfocus="WdatePicker({dateFmt:'yyyy-M-d 00:00:00'})"/> - <input id="endDate" name="end_time" value="{:I('end_time')}" class="Wdate" type="text" onfocus="WdatePicker({dateFmt:'yyyy-M-d 00:00:00'})"/>

                    订单号 ：<input name="order_id" type="text" placeholder="" value="{:I('order_id')}" style="width:120px;" />

                    用户：<input name="user_id" type="text" placeholder="" value="{:I('user')}" style="width:120px;" />

                    师傅：<input name="master" type="text" placeholder="" value="{:I('master')}" style="width:120px;" />

                    <a class="btn btn-primary btn-sm radius5" href="javascript:;" id="search" url="{:U('Complaint/Manage')}">查询</a>

                </th>
                </thead>
            </table>
        </div>
    </form>
    <div class="table-responsive">
        <table class="table table-striped table-bordered table-hover" id="mytable">
            <thead>
            <tr>
                <th>序号</th>
                <th>订单编号</th>
                <th>服务项目</th>
                <th>用户</th>
                <th>师傅</th>
                <th>投诉内容</th>
                <th>投诉时间</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            <volist name="Complaint" id="vo">
                <tr>
                    <td>{$key+1}</td>
                    <td>{$vo.repair_order_num_alias}</td>
                    <td>分类：{$vo.category_name}<br>故障：{$vo.Fault_name}</td>
                    <td>{$vo.user_name}<br>{$vo.user_phone}</td>
                    <td>{$vo.master_name}<br>{$vo.master_phone}</td>
                    <td>{$vo.complaint}</td>
                    <td>{$vo.add_time}</td>
                    <td><a href="{:U('Complaint/visit')}/complaint_id/{$vo.id}" class="btn btn-xs btn-info radius5">处理记录</a></td>
                </tr>
            </volist>
            <tr>
                <td colspan="20" class="page">{$page}</td>
            </tr>
            </tbody>
        </table>
    </div>
</block>
<block name="javascript">
    <script>
        $(function(){

            $("#search").click(function () {
                var url = $(this).attr('url');
                var query = $('.search-form').find('input,select').serialize();
                query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g, '');
                query = query.replace(/^&/g, '');
                if (url.indexOf('?') > 0) {
                    url += '&' + query;
                } else {
                    url += '?' + query;
                }
                window.location.href = url;
            });

        });
    </script>

</block>